package com.automobile.backstage.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import org.springframework.web.multipart.MultipartFile;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/*
 * 发帖或是商品信息
 */
@JsonIgnoreProperties(value = {"handler"})
public class Announce implements Serializable{

    private int id;
    private String title;//标题
    private String message;//信息信息内容
    private Date date;//发帖时间
    private int userId;
    private int carBrandId;
    private String carBrand;
    private int carTypeId;
    private String carType;
    private String status;//是否上架--Y/N
    private BigDecimal money;
    private String age;//车龄
    private String km;//行驶公里
    private String standard;//排放标准
    private String displacement;//排量
    private String gearbox;//变速箱
    private String country;//国别
    private String colour;//颜色
    private String capabilities;//能源
    private String lock;


    private List<String> imgs;
    private User user;


    public String getLock() {
        return lock;
    }

    public void setLock(String lock) {
        this.lock = lock;
        if(lock.equals("on")){
            status = "Y";
        }else{
            status = "N";
        }
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<String> getImgs() {
        return imgs;
    }
    public void setImgs(List<String> imgs) {
        this.imgs = imgs;
    }


    public String getCarBrand() {
        return carBrand;
    }
    public void setCarBrand(String carBrand) {
        this.carBrand = carBrand;
    }
    public String getCarType() {
        return carType;
    }
    public void setCarType(String carType) {
        this.carType = carType;
    }
    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public int getCarTypeId() {
        return carTypeId;
    }
    public void setCarTypeId(int carTypeId) {
        this.carTypeId = carTypeId;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
    public Date getDate() {
        return date;
    }
    public void setDate(Date date) {
        this.date = date;
    }
    public int getUserId() {
        return userId;
    }
    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getCarBrandId() {
        return carBrandId;
    }
    public void setCarBrandId(int carBrandId) {
        this.carBrandId = carBrandId;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }





    public String getAge() {
        return age;
    }
    public void setAge(String age) {
        this.age = age;
    }
    public String getKm() {
        return km;
    }
    public void setKm(String km) {
        this.km = km;
    }
    public String getStandard() {
        return standard;
    }
    public void setStandard(String standard) {
        this.standard = standard;
    }
    public String getDisplacement() {
        return displacement;
    }
    public void setDisplacement(String displacement) {
        this.displacement = displacement;
    }
    public String getGearbox() {
        return gearbox;
    }
    public void setGearbox(String gearbox) {
        this.gearbox = gearbox;
    }
    public String getCountry() {
        return country;
    }
    public void setCountry(String country) {
        this.country = country;
    }
    public String getColour() {
        return colour;
    }
    public void setColour(String colour) {
        this.colour = colour;
    }
    public String getCapabilities() {
        return capabilities;
    }
    public void setCapabilities(String capabilities) {
        this.capabilities = capabilities;
    }




    @Override
    public String toString() {
        return "Announce [id=" + id + ", title=" + title + ", message=" + message + ", date=" + date + ", userId="
                + userId + ", carBrandId=" + carBrandId + ", carBrand=" + carBrand + ", carTypeId=" + carTypeId
                + ", carType=" + carType + ", status=" + status + ", money=" + money + ", age=" + age + ", km=" + km
                + ", standard=" + standard + ", displacement=" + displacement + ", gearbox=" + gearbox + ", country="
                + country + ", colour=" + colour + ", capabilities=" + capabilities + ", imgs=" + imgs + "]";
    }



}
